package com.ruoyi.tb.lmt.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tb.lmt.domain.TbLocomotive;
import com.ruoyi.tb.lmt.domain.bo.TbLocomotiveBo;
import com.ruoyi.tb.lmt.domain.vo.*;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.List;

/**
 * 大机配属Mapper接口
 *
 * @author ruoyi
 * @date 2023-11-30
 */
@Mapper
public interface TbLocomotiveMapper extends BaseMapperPlus<TbLocomotiveMapper, TbLocomotive, TbLocomotiveVo> {

    List<TbLocomotiveVo> lmtListByStatus();

    ArrayList<LmtNumberVo> selectByLmtType(String lmtType);

    ArrayList<LmtNumberVo> selectByLmtNumber(String lmtNumber);

    ArrayList<LmtNumberVo> selectBy();

    Long selectByLmtId(String lmtNumber);

    String selectStatusByLmtNumber(String lmtNumber);

    String selectLmtTypeByLmtNumber(String lmtNumber);

    List<TbDigitalLmtVo> selectDigitalLmt(String lmtNumber);

    List<EquipmentVo> selectEquipment(String lmtNumber);

    TbLocomotiveVo selectLocomotive(String lmtNumber);

    TbLocomotiveVo selectLocomotiveByrfidBzm(String rfidBzm);


    Integer selectOverhaulCount();

    Integer selectAllCount();

    int updateByBoLmtNumber(TbLocomotiveBo lmtBo);

    boolean existsById(Long id);

    Page<TbLocomotiveVo> listLocomotivePage(Page<Object> build, LambdaQueryWrapper<TbLocomotive> lqw);
}
